Skip to content

Conversation

@Grufoony
Copy link
Collaborator

@Grufoony Grufoony commented Mar 7, 2025

And separate RoadJunction class from Node

@codecov
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 82.60870% with 8 lines in your changes missing coverage. Please review.

Project coverage is 90.97%. Comparing base (6b1cbc8) to head (5cdcb52).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dsm/sources/Station.cpp 50.00% 4 Missing ⚠️
src/dsm/sources/RoadJunction.cpp 88.88% 2 Missing ⚠️
src/dsm/headers/Intersection.hpp 80.00% 1 Missing ⚠️
src/dsm/headers/Roundabout.hpp 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
+ Coverage   90.95%   90.97%   +0.01%     
==========================================
  Files          36       37       +1     
  Lines        5153     5152       -1     
  Branches      463      463              
==========================================
  Hits         4687     4687              
+ Misses        466      465       -1     
Flag Coverage Δ
unittests 90.97% <82.60%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

/// @brief Construct a new Intersection object
/// @param id The node's id
explicit Intersection(Id id) : Node{id} {};
explicit Intersection(Id id) : RoadJunction{id} {};

Check notice

Code scanning / Cppcheck (reported by Codacy)

Member variable 'Intersection::m_agentCounter' is not initialized in the constructor. Note

Member variable 'Intersection::m_agentCounter' is not initialized in the constructor.
/// @param id The node's id
/// @param coords A std::pair containing the node's coordinates
Intersection(Id id, std::pair<double, double> coords) : Node{id, coords} {};
Intersection(Id id, std::pair<double, double> coords) : RoadJunction{id, coords} {};

Check notice

Code scanning / Cppcheck (reported by Codacy)

Member variable 'Intersection::m_agentCounter' is not initialized in the constructor. Note

Member variable 'Intersection::m_agentCounter' is not initialized in the constructor.
Intersection(Id id, std::pair<double, double> coords) : RoadJunction{id, coords} {};

Intersection(Node const& node) : Node{node} {};
Intersection(RoadJunction const& node) : RoadJunction{node} {};

Check notice

Code scanning / Cppcheck (reported by Codacy)

Member variable 'Intersection::m_agentCounter' is not initialized in the constructor. Note

Member variable 'Intersection::m_agentCounter' is not initialized in the constructor.
Intersection(Id id, std::pair<double, double> coords) : RoadJunction{id, coords} {};

Intersection(Node const& node) : Node{node} {};
Intersection(RoadJunction const& node) : RoadJunction{node} {};

Check warning

Code scanning / Cppcheck (reported by Codacy)

Class 'Intersection' has a constructor with 1 argument that is not explicit. Warning

Class 'Intersection' has a constructor with 1 argument that is not explicit.

RoadJunction& operator=(RoadJunction const& other) {
if (this != &other) {
Node::operator=(other);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
value += pStreet->nLanes() * pStreet->transportCapacity();
}
pNode->setTransportCapacity(value == 0 ? 1 : value);
pNode->setTransportCapacity(value == 0. ? 1. : value);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
namespace dsm {
Station::Station(Id id, Delay managementTime)
: Node(id), m_managementTime{managementTime} {}
: RoadJunction(id), m_managementTime{managementTime} {}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule

Station::Station(Id id, std::pair<double, double> coords, Delay managementTime)
: Node(id, coords), m_managementTime{managementTime} {}
: RoadJunction(id, coords), m_managementTime{managementTime} {}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
Station::Station(Node const& node, Delay managementTime)
: Node(node), m_managementTime{managementTime} {}
Station::Station(RoadJunction const& node, Delay managementTime)
: RoadJunction(node), m_managementTime{managementTime} {}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
Station::Station(Station const& other)
: Node(other), m_managementTime{other.m_managementTime}, m_trains{other.m_trains} {}
: RoadJunction(other),
m_managementTime{other.m_managementTime},

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
@Grufoony Grufoony closed this Mar 10, 2025
@Grufoony Grufoony deleted the RefactorNodes branch March 10, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants